package com.zw.design.pattern.creational.structural.decorator.v2;

public class TestMain {
    public static void main(String[] args) {
      ABattercake aBattercake;
      aBattercake=new Battercake();
      //加鸡蛋
      aBattercake=new EggDecorator(aBattercake);
      //加火腿
      aBattercake=new SausageDecorator(aBattercake);
      aBattercake=new EggDecorator(aBattercake);

        System.out.println("aBattercake = " + aBattercake.getDesc()+" 价格 "+aBattercake.cost());

    }
}
